package com.ruoyi.web.wx.controller;

import com.ruoyi.carouselimage.domain.CarouselImage;
import com.ruoyi.carouselimage.service.ICarouselImageService;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.page.TableDataInfo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
@Api(tags = "轮播图")
@RestController
@RequestMapping("/wx/carouselimage")
public class WxCarouselimageController extends BaseController {
    @Autowired
    private ICarouselImageService carouselImageService;

    /**
     * 查询【所有轮播图】列表
     */
    @ApiOperation("查询所有轮播图列表")
    @GetMapping("/list")
    public TableDataInfo list(CarouselImage carouselImage) {
        startPage();
        List<CarouselImage> carouselImages = carouselImageService.selectCarouselImageList(carouselImage);
        return getDataTable(carouselImages);
    }
}
